<?php
ob_start();
?>

<?php

	include 'connect/connect.php';
	include 'class/class.phieuthu.php';
check_admin();
	$phieuthu = new phieuthu;

			echo "<table border='1' style='border-collapse: collapse'>";
		echo   '	<tr>
		<td width="64" rowspan="2">
		<p align="center">Edit</td>		
		<td width="64" rowspan="2">
		<p align="center">Họ và tên</td>				
		<td width="64" rowspan="2">
		<p align="center">Mã phi&#7871;u</td>
		<td width="93" rowspan="2">
		<p align="center">Lo&#7841;i</td>
		<td width="276" colspan="4" height="34">
		<p align="center">&#272;&#7883;a ch&#7881;</td>
		<td width="62" rowspan="2">
		<p align="center">Khóa</td>
		<td width="100" rowspan="2">
		<p align="center">Ngày b&#7855;t &#273;&#7847;u h&#7885;c</td>
		<td width="88" rowspan="2">
		<p align="center">TKB</td>
		<td width="84" rowspan="2">
		<p align="center">Gi&#7901; h&#7885;c</td>
		<td width="83" rowspan="2">
		<p align="center">L&#432;&#417;ng</td>
		<td width="109" rowspan="2">
		<p align="center">Yêu c&#7847;u khác</td>
	</tr>
	<tr>

		<td width="62" height="31">
		<p align="center">Số nhà</td>
		<td width="62" height="31">
		<p align="center">Ph&#432;&#7901;ng</td>
		<td width="62" height="31">
		<p align="center">Quận</td>
		<td width="88" height="31">
		<p align="center">Thành ph&#7889;</td>
	</tr>
				
		';

	$result = mysql_query("SELECT * FROM tbl_thuphieu  WHERE f_ngaybatdau ='".$_GET['d']."' ORDER BY f_maphieu DESC") ;

	while($row = mysql_fetch_array($result))
	{

		echo '	<tr>
		<td bgcolor="#D6E0D8"> <a href="edit.php?stt='.$row['f_maphieu'] .'">Edit</a></td>		
		<td width="64">
		<p align="center">'.$row['f_hovaten'].'</td>		
		<td width="64">
		<p align="center">'.$row['f_maphieu'].'</td>
		<td width="93">
		<p align="center">'.$row['f_loaihinh'].'</td>
		<td width="62">
		<p align="center" title='.$row['f_sonha'].'>'.$row['f_sonha'].'</td>
		<td width="62">
		<p align="center" title='.$row['f_sonha'].'>'.$row['f_phuong'].'</td>
		<td width="62">
		<p align="center" title='.$row['f_sonha'].'>'.$row['f_quan'].'</td>
		<td width="88">
		<p align="center" title='.$row['f_sonha'].'>'.$row['f_tp'].'</td>
		<td width="62">
		<p align="center">'.$phieuthu->khoa($row['f_khoa']) .'</td>
		<td width="100">
		<p align="center">'.$row['f_ngaybatdau'].'</td>
		<td width="88">
		<p align="center">'.$row['f_tkb'].'</td>
		<td width="84">
		<p align="center">'.$row['f_ca'].'</td>
		<td width="83">
		<p align="center">'. number_format($row['f_muchp']).'</td>
		<td width="109">
		<p align="center">'.$row['f_dkbd_ca'].'</td>
		<td width="109">
		<p align="center"><a href=saplop.php?id='.$row['f_maphieu'].'>Sắp lớp</a></td>
	</tr>';
	
	}
?>